package neu.soft.controller;

import neu.soft.entity.NormalOrder;
import neu.soft.service.impl.DistributionTaskOrderServiceImpl;
import neu.soft.vo.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/distributionTaskOrder")
public class DistributionTaskOrderController {
    @Autowired
    private DistributionTaskOrderServiceImpl distributionTaskOrderService;
    @RequestMapping("/autoCreateDistributionTaskOrder")
    public ResultBean DistributionTaskOrder(@RequestBody NormalOrder normalOrder) throws Exception {
        System.out.println(normalOrder.toString());
        System.out.println("运行");
        //distributionTaskOrderService.sendObject("assa",0);
        return distributionTaskOrderService.autoCreateDistributionTaskOrder(normalOrder);
    }
}
